// Copyright (c) 2007 Robin Boerdijk. All rights reserved.
//
// This software is licensed under the terms of the Microsoft Reciprocal License as described 
// in the file LICENSE.txt, which you should have received as part of this distribution. The 
// license terms are also available at http://www.opensource.org/licenses/ms-rl.html.

#include "wtkpc.h"

#include "wtk/PushButton.h"

namespace wtk
{
	PushButton::PushButton(DialogWindow *dialogWindow, const std::wstring &text)
		: ButtonControl(dialogWindow)
		, text(text)
	{
		this->style |= BS_PUSHBUTTON;
	}

	SIZE PushButton::GetMinimumSize()
	{
		SIZE minimumSize = Window::GetTextBoxSize(this->text);
		minimumSize.cx += 8;
		minimumSize.cy += 4;
		return minimumSize;
	}

	void PushButton::Create()
	{
		Window::Create(this->text.c_str(), NULL);
	}
}
